package com.zxx.pattern.decoratorPattern.decorator1;

/**
 * @author zxx on 2021/7/13
 */
public class Milk extends CondimentDecorator {

    private Beverage beverage;

    public Milk(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + " + Milk";
    }

    @Override
    public double getCost() {
        return beverage.getCost() + 5.5;
    }
}
